#include "ioservice.hpp"
#include "work.hpp"

using namespace boost;

IoService::IoService()
{
}

IoService::~IoService()
{
}

void IoService::run()
{
	m_ioService.run();
}

void IoService::stop()
{
	return m_ioService.stop();
}

IWork* IoService::createWorkForThis()
{
	return new Work(std::shared_ptr<asio::io_service::work>(new asio::io_service::work(m_ioService)));
}

boost::asio::io_service& IoService::getBoostIoService()
{
	return m_ioService;
}
